var currentIndexTemp = 0;
var indexTemp = 0;
var frame,date;
efform_onload = function ()
{ 
};  

button_query_onclick = function () 
{   
	frame = 0;
	date = 	$("#inqu_status-0-fdVirtualDate").val();
	var info = getDetail("ef_region_inqu","inqu_status");
	if (null != info){ 
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG91&flag=1"||indexTemp=='0')
	{
		fundiv(0,0);
	
	}
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG92&flag=2"||indexTemp=='1')
	{
		fundiv(1,1);

	}
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG94&flag=3"||indexTemp=='2')
	{
		fundiv(2,2);

	}
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG95&flag=4"||indexTemp=='3')
	{
		fundiv(3,3);

	}
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG96&flag=5"||indexTemp=='4')
	{
		fundiv(4,4);

	}
	if(frame.src == "http://localhost:8080/sczx/DispatchAction.do?efFormEname=ZMCG97&flag=6"||indexTemp=='5')
	{
		fundiv(5,5);

	}
  } 
}

function fundiv(currentIndex,index){  
	currentIndexTemp = currentIndex;
	indexTemp = index;
	if(index ==0)
	{  
		 frame = frames[0];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG91" +"&flag=1" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG91" +"&flag=1";
		 }
		efform.setStatus(0, "正在加载...");
	}else if(index ==1)
	{ 
		 frame = frames[1];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG92" +"&flag=2" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG92" +"&flag=2";
		 }
		efform.setStatus(0, "正在加载...");
	}
//	else if(index ==2)
//	{ 
//		var frame = frames[2];
//		frame.src = "DispatchAction.do?efFormEname=ZMCG93";
//		efform.setStatus(0, "正在加载...");
//	}
	else if(index ==2)
	{ 
		 frame = frames[2];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG94" +"&flag=3" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG94" +"&flag=3";
		 }
		efform.setStatus(0, "正在加载...");
	}
	else if(index ==3)
	{ 
		 frame = frames[3];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG95" +"&flag=4" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG95" +"&flag=4";
		 }
		efform.setStatus(0, "正在加载...");
	}
	else if(index ==4)
	{
		 frame = frames[4];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG96" +"&flag=5" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG96" +"&flag=5";
		 }
		efform.setStatus(0, "正在加载...");
	}
	else if(index ==5)
	{ 
		 frame = frames[5];
		 if (date != '' && date != undefined) {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG97" +"&flag=6" +"&inqu_status-0-fdVirtualDate=" + date;
		 } else {
			 frame.src = "DispatchAction.do?efFormEname=ZMCG97" +"&flag=6";
		 }
		efform.setStatus(0, "正在加载...");
	}
} 
